function myhist(data,min,max,bar_num)
data1 = data(data<=max&data>=min);

bin_width = (max-min)/bar_num;
bin_center = (min+0.5*bin_width):bin_width:max;
hist(data1,bin_center);
set(gca,'FontSize',16);